clc,clear,close;
fid=fopen('questionB.txt','r');
[C1,count]=fscanf(fid,'%f',[1001,4]);
fclose(fid);
x=-5:.01:5;
f=@(x) 1./(1+x.^2);
y=f(x);
subplot(2,2,1),plot(x,C1(:,1));
hold on;
plot(x,y);
hold off;
title('n=2');
subplot(2,2,2),plot(x,C1(:,2));
hold on;
plot(x,y);
hold off;
title('n=4');
subplot(2,2,3),plot(x,C1(:,3));
hold on;
plot(x,y);
hold off;
title('n=6');
subplot(2,2,4),plot(x,C1(:,4));
hold on;
plot(x,y);
hold off;
title('n=8');